package className;

import org.junit.Test;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class TestClass {
    public void outPut() {
        System.out.println("i need you!");
    }

    public static void main(String[] args) {

        for (int i = 0; i < 50; i++)
        {
            new Thread(()-> System.out.println(Thread.currentThread().getName()+"========="),"A"+i).start();
        }

        for (int i = 0; i < 20; i++)
        {
            new Thread(()-> System.out.println(Thread.currentThread().getName()+"========="),"B"+i).start();
        }

    }

    @Test
    public void test()
    {
        try
        {
            String[] s = new String[5];
            String s1 = "1,2,3,4,5";
            System.out.println(Arrays.asList(s1.split(",")));
            List<String> list = Arrays.asList(s1.split(","));

            for (int i = 0,j=list.size(); i < j; i++)
            {
                s[i] = list.get(i);
            }

            System.out.println(Arrays.asList(s));

            Map map = new HashMap();
            map.put("", "");
            System.out.println("=========="+map);
            Object string = Class.forName("file.FileFile");
            System.out.println(string.toString());
        }
        catch (ClassNotFoundException e)
        {
            e.printStackTrace();
        }

    }

    @Test
    public void test1()
    {
        String path = "/cdc/csdcs/csdc";
        int i = path.lastIndexOf("/");
        String substring = path.substring(0, 10);
        System.out.println(substring);
        System.out.println(i);
    }
}
